<!doctype html>
<html lang="zh-CH">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>央票通</title>
	<link rel="stylesheet" href="./resource/css/index.css">
	<link rel="stylesheet" href="./resource/css/user_name.css">
</head>
<?php $info =session_get(UserEnum::CLIENT_NEWS_CAPTCHA)?>
<body>
<!-- 头部 -->
@include('common.index_head');
<!-- 个人中心 -->
<div class="cont-user">
	<div class="user-name">
		<div class="main">
			<div class="name-cont">
				<div class="title">
					<span>找回密码</span>
				</div>
				<div class="form form-pass form-pass-2">
					<form action="/user_retrieve_pwd_thr" onsubmit="return check_all()" method="post">
						<div class="pass-tit">
							<div class="number">2</div>
							<div class="til">获取验证码</div>
						</div>
						<div class="form-group">
							<label for="">手机验证码</label>
							<input type="text" class="form-control" placeholder="请输入验证码" id="news_captcha"><span id="t_news"></span>
						</div>
						<div class="form-group">
							<div class="form-p">手机验证码已经发到您<span><?php echo substr_replace($info['mobile'],'****',3,4)?></span>手机号码上，请注意查看</div>
			</div>
						<input type="submit" class="btn btn-register" value="下一步">
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- footer -->
@include('common.index_foot')
<script src="./resource/js/jquery-1.11.3.min.js"></script>
<script src="./resource/js/index.js"></script>
<script>
function check_all()
{
	var news_captcha = document.getElementById('news_captcha').value;
	var status = false;
	var ajax = new XMLHttpRequest();
	ajax.onreadystatechange = function () {
		if (ajax.readyState == 4) {
			if (ajax.responseText == 0) {
				document.getElementById("t_news").innerHTML = "<span style='color:red'>验证码有误</span>";
			} else {
				document.getElementById("t_news").innerHTML = "";
			}
		}
	}
	//与服务器建立连接
	ajax.open('post', '/js_verify_user_news', false);
	ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	//处理请求
	ajax.send('news_captcha=' + news_captcha);
	return status
}
</script>
</body>
</html>